﻿using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace ProtoImaginer
{
    public class ControlViewModel : INotifyPropertyChanged
    {
        private double _width;

        public double Width
        {
            get
            {
                return _width;
            }
            set
            {
                if (value != _width)
                {
                    _width = value;
                    NotifyPropertyChanged("Width");
                }
            }
        }

        private double _height;

        public double Height
        {
            get
            {
                return _height;
            }
            set
            {
                if (value != _height)
                {
                    _height = value;
                    NotifyPropertyChanged("Height");
                }
            }
        }

        private double _x;

        public double X
        {
            get
            {
                return _x;
            }
            set
            {
                if (value != _x)
                {
                    _x = value;
                    NotifyPropertyChanged("X");
                }
            }
        }


        private double _y;

        public double Y
        {
            get
            {
                return _y;
            }
            set
            {
                if (value != _y)
                {
                    _y = value;
                    NotifyPropertyChanged("Y");
                }
            }
        }

        private String _linkTo;

        public String LinkedTo
        {
            get
            {
                return _linkTo;
            }
            set
            {
                if (value != _linkTo)
                {
                    _linkTo = value;
                    NotifyPropertyChanged("LinkedTo");
                }
            }
        }
        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}